Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Initializing and Terminating QuickDraw 3D

To use the services of QuickDraw 3D, you need to call Q3Initialize before calling any other QuickDraw 3D functions. When you are finished using QuickDraw 3D services, you should call Q3Exit .

Q3Initialize

You should call the Q3Initialize function to initialize a connection to QuickDraw 3D.

TQ3Status Q3Initialize (void);

DESCRIPTION

The Q3Initialize function initializes a connection between your application and the QuickDraw 3D graphics library. QuickDraw 3D allocates whatever internal storage it needs to manage subsequent calls to QuickDraw 3D routines, and it initializes any subcomponents it needs to call. If Q3Initialize returns kQ3Failure , you should not call any QuickDraw 3D routines other than the Q3IsInitialized function or the error-reporting routines provided by the Error Manager. Calling Q3Initialize more than once results in a warning being posted but is otherwise acceptable.

SPECIAL CONSIDERATIONS

You must call Q3Initialize to create a connection to the QuickDraw 3D software before calling any other QuickDraw 3D routines.

ERRORS

kQ3ErrorAlreadyInitialized kQ3ErrorNotInitialized kQ3ErrorOutOfMemory

Q3Exit

You should call the Q3Exit function to close your application's connection to QuickDraw 3D.

TQ3Status Q3Exit (void);

DESCRIPTION

The Q3Exit function closes your application's connection to QuickDraw 3D and deallocates any memory used by that connection. You should call Q3Exit when your application is finished using QuickDraw 3D routines. After calling Q3Exit , you should not call any QuickDraw 3D routines other than Q3Initialize , Q3IsInitialized , or the error-reporting routines provided by the Error Manager. Calling Q3Exit more than once results in a warning being posted but is otherwise acceptable.

ERRORS

kQ3ErrorMemoryLeak

Q3IsInitialized

You can use the Q3IsInitialized function to determine whether your application has successfully initialized a connection to QuickDraw 3D.

TQ3Boolean Q3IsInitialized (void);

DESCRIPTION

The Q3IsInitialized function returns a Boolean value that indicates whether your application has successfully initialized a connection to the QuickDraw 3D shared library ( kQ3True ) or not ( kQ3False ).


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |